package designPattern.behavioralPattern.chainOfResponsibility.只有一个处理者进行处理;

/**
 * @author wei.zhao
 * @description:
 * @date 2021年12月17日 11:08
 */
public class Test {

    public static void main(String[] args) {
        //组装责任链
        Handler handler1 = new ConcreteHandler1();
        Handler handler2 = new ConcreteHandler2();
        handler1.setNext(handler2);
        //提交请求
        handler1.handleRequest("two");
    }

}
